package com.gxa.medical.service.impl;

import com.gxa.medical.mapper.ActivityHTMapper;
import com.gxa.medical.pojo.Activity;
import com.gxa.medical.service.ActivityHTService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class ActivityHTServiceImpl implements ActivityHTService {
    @Autowired
    ActivityHTMapper activityHTMapper;
    @Override
    public List<Map<String, Object>> selectAllByPage(Integer page, Integer size) {
        return activityHTMapper.selectAllByPage((page-1)*size,size);
    }

    @Override
    public List<Map<String, Object>> selectByLike(String name, String host, String regTime, String overTime, Integer isud, String liveTime, Integer page, Integer size) {
        return activityHTMapper.selectByLike(name, host, regTime, overTime, isud, liveTime, (page-1)*size, size);
    }

    @Override
    public List<Map<String, Object>> selectAllByim() {
        return activityHTMapper.selectAllByim();
    }

    @Override
    public Integer selectByDocName(String name) {
        return activityHTMapper.selectByDocName(name);
    }

    @Override
    public Integer insert(Activity activity) {
        return activityHTMapper.insert(activity);
    }

    @Override
    public void insertAD(Integer act_id, Integer doc_id) {

    }

    @Override
    public void delete(Integer aid) {

    }

    @Override
    public void deleteAD(Integer act_id) {

    }

    @Override
    public Activity selectByAid(Integer aid) {
        return activityHTMapper.selectByAid(aid);
    }

    @Override
    public List<Map<String, Object>> selectByUid(Integer aid) {
        return activityHTMapper.selectByUid(aid);
    }
}
